//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { LinkGroup, LinkGroupResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooLinkGroupList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<LinkGroupResponse>(`/uctoo/link_group/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooLinkGroup = async (id: string) => {
  return requestClient.get<LinkGroup>(`/uctoo/link_group/${id}`);
};

export const adductooLinkGroup = async (data: Partial<LinkGroup>) => {
  return requestClient.post<LinkGroup>('/uctoo/link_group/add', data);
};

export const edituctooLinkGroup = async (data: Partial<LinkGroup>) => {
  return requestClient.post<LinkGroup>('/uctoo/link_group/edit', data);
};

export const deleteuctooLinkGroup = async (id: string) => {
  return requestClient.post<any>('/uctoo/link_group/del', { id });
};
